#ifndef LIB_GEOUTILS_POLYLINE_H
#define LIB_GEOUTILS_POLYLINE_H
#include "libGeoutils/shape/Coord.h"
#include <vector>

namespace geo {
namespace shape {
class GEOUTILS_EXPORT Polyline : public geo::prop::Properties
{
public:
	using sptr = std::shared_ptr<Polyline>;
	using csptr = std::shared_ptr<const Polyline>;

	Polyline();
	Polyline(const std::vector<Coord::sptr>& coords);
	virtual ~Polyline();

	bool appendCoord(Coord::sptr spCoord);
	std::vector<Coord::sptr> getCoords() const;
	Coord::sptr getCoordIndexAt(unsigned int index) const;

	bool to_string(std::string& out_str) const override;
	bool to_json(std::string& out_str) const override;
	bool from_json(const std::string& in_str) override;

protected:
	std::vector<Coord::sptr> mCoords;

private:

};

} //! shape namespace
} //! geo namespace

#endif // !LIB_GEOUTILS_POLYLINE_H
